<template>
  <div class="message">
    <el-button :plain="true" @click="open2" type="success">成功</el-button>
    <el-button :plain="true" @click="open3" type="warning">警告</el-button>
    <el-button :plain="true" @click="open1" type="info">消息</el-button>
    <el-button :plain="true" @click="open4" type="danger">错误</el-button>
  </div>
</template>

<script>
  export default {
    methods: {
      open1() {
        this.$message('这是一条消息提示');
      },
      open2() {
        this.$message({
          message: '恭喜你，这是一条成功消息',
          type: 'success'
        });
      },

      open3() {
        this.$message({
          message: '警告哦，这是一条警告消息',
          showClose: true,
          type: 'warning'
        });
      },

      open4() {
        this.$message.error('错了哦，这是一条错误消息');
      }
    }
  }
</script>

<style lang="scss" scoped>

</style>